<?php if (!defined('THINK_PATH')) exit();?><!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>我的佣金</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />

<script type="text/javascript" src="/Public/js/jquery-2.1.1.min.js"></script>

 <link href="/ge/css/style.css" type="text/css" rel="stylesheet" />

<link href="/Public/Weixin/css/index.css?v=<?php echo rand(0,99);?>" rel="stylesheet" type="text/css">

<link href="/Public/Weixin/css/head.css?v=<?php echo rand(0,99);?>" rel="stylesheet" type="text/css">

<style></style>

<script>

$(document).ready(function () { 

	$(function(){

		  $.get("<?php echo U('ajaxyongjin');?>",{},function(res){

			 $(".yongjin2").append(res.html);

		  },'json');

	});

	

	$(window).scroll(function(){

	   var scrollTop = $(this).scrollTop();

	   var scrollHeight = $(document).height();

	   var windowHeight = $(this).height();

	   if(scrollTop + windowHeight >= scrollHeight){

		  var page = parseInt($("input[name='page']").val());

		  $.get("<?php echo U('ajaxyongjin');?>",{page:page},function(res){

			 $(".yongjin2").append(res.html);

			 $("input[name='page']").val(page+1);

		  },'json');

	   }

   });

   

   $(".yongjin2").delegate(".xiang", "click", function(){

	   var uls = $(this).parent().parent().find('ul');

	   $('.yongjin2 ul').hide();

	   if(uls.is(':visible')){

		   uls.hide();

	   } else {

		   uls.show();

	   }	     

   }); 
  
  $('.yongjinall').click(function(){
        $('#dengdai').show();
        $.post("<?php echo U('ajaxtixian');?>",null,function(res){
           $('#dengdai').hide();
          //alert(JSON.stringify(res)); 
          if(res.code == 2){
                $('.msgbox .txt').text('提现成功');
                $('.msgbox').show();
           }else if(res.code == 4){
                $('.msgbox .txt').text('佣金满1元可提现');
                $('.msgbox').show();
           }else if(res.code == 6){
                $('.msgbox .txt').text('至少拆一次红包，才能提现');
                $('.msgbox').show();
           }else{
              $('.msgbox .txt').text('佣金满1元可提现');
              $('.msgbox').show();
           }
        },'json');
    });

   

});

</script>

</head>

<body>

</head>
  <body class="main_background">
        <div class="box padding_bottom02">
            <div class="top_02">
                 <img src="/bao/picture/top_bg.png" />
            </div>
            <div class="guang">
                <img id="img" src="/bao/picture/guang.png" />
            </div>
            <script type="text/javascript">
                $(document).ready(function() {
                    var angle = 0;
                    setInterval(function() {
                        angle += 3;
                        $("#img").rotate(angle);
                    },
                    100);
                });
            </script>
            <div class="center">
                <div class="c_b background_white b_r no_pt cb_p">
                    <div style="margin-bottom: 10px;margin-top: 25px;">
                        <div style="width: 100%;height:0px;line-height:20px;padding-top: 5px;padding-bottom: 5px;">
                            <div style="margin-left: 0;margin-right: 5px;">
                                <ul id="marquee" class="marquee" style="font-size: 15px;">
                                    <li>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
<body>

<input type="hidden" value="1" name="chaiact">
<input type="hidden" value="2" name="page">
<!--1可拆2锁定--> 








 

<?php $txsetting = M('sys_config')->find(); ?>
<?php if($txsetting['cyongjinfa']==2){?>
<div class="yongjinall title font_red t_p" style="background: yellow;width:80%;margin:0 auto;height:0.5rem;line-height:0.3rem;color:#fff;border-radius: 8px;">全部提现</div>
<?php }?>
<div class="title no_margin font_red t_p" style="display:none">佣金为人工发放<p>页面状态会显示为未结算</div>

<div class="yongjin3">今日剩余结算次数（含拆红包和佣金结算）：<?php echo ($cishu); ?>次</div>

<div class="yongjin2"></div>



<script>

$(document).ready(function () { 

   var zhanshiboxsetInterval;

   $(function(){	

      /*   

	   if( String(location).indexOf("Wap&c=Index&a=index") == -1 && String(location).indexOf("Wap&c=Index&a=hb") == -1 ){

		    $.post("<?php echo U('Ajax/checkzhanghu');?>",{},function(res){

				if(res.code==1){

					 alert('请先拆红包');

					 $.post("<?php echo U('Ajax/gethbid');?>",{hbid:<?php echo (intval($hb[id])); ?>},function(res){

					     location.href='<?php echo U("hb?hbid=");?>'+res.hbid;

					 },'json');

				}

			},'json');

	   }

	   */

	   $.post("<?php echo U('Ajax/getfaqiancishu');?>",{},function(res){});

	   $.post('<?php echo U("Ajax/fayongjin");?>',{},function(){	});

	   $.post('<?php echo U("Ajax/checkuserhb");?>',{},function(){	});

	   zhanshiboxsetInterval = setInterval(zhanshibox, 10000);

	   zhanshibox();

   });

   $('#qianghongbao').click(function(){

	   $.post("<?php echo U('Ajax/gethbid');?>",{hbid:<?php echo (intval($hbid)); ?>},function(res){

			location.href='<?php echo U("Index/hb?hbid=");?>'+res.hbid;

	   },'json');

   });

   $('#checkdaili').click(function(){

	   $.post("<?php echo U('Ajax/checkdaili');?>",{},function(res){

		   if(res.code == 0){

			   location.href='<?php echo U("Index/kefu");?>';

		   } else {

			   location.href='<?php echo U("Index/daili");?>';

		   }

	   },'json');

   });

   $('.msgbox .but').click(function(){

	    var msgbox = $("input[name='msgbox']").val();

		if(msgbox == 1){

            $.post("<?php echo U('Ajax/checkzhanghu');?>",{hbid:<?php echo (intval($hbid)); ?>},function(res){

				if(res.code==1){

                     location.href = "<?php echo U('Index/index');?>";

				} else {

                     location.href = "<?php echo U('Index/index');?>";

				}

			},'json');

			return false;

		}

		if(msgbox == 2){

            $.post("<?php echo U('Ajax/checkzhanghu');?>",{hbid:<?php echo (intval($hbid)); ?>},function(res){

				if(res.code==1){

					location.href = "<?php echo U('Zhuanpan/index');?>";

				} else {

				    location.href = "<?php echo U('Chongzhi/chong?ctype=2&hbid='.$hbid);?>";

				}

			},'json');

			return false;

		}

		if(msgbox == 3){

            $.post("<?php echo U('Ajax/checkzhanghu');?>",{hbid:<?php echo (intval($hbid)); ?>},function(res){

				if(res.code==1){

					location.href = "<?php echo U('Guaguale/index');?>";

				} else {

				    location.href = "<?php echo U('Chongzhi/chong?ctype=4&hbid='.$hbid);?>";

				}

			},'json');

			return false;

		}

		if(msgbox == 4){

			location.href = "<?php echo U('Ucenter/index');?>";	

			return false;

		}

		$('.msgbox').hide();

   });   

});

function zhanshibox(){

	$.post("<?php echo U('Ajax/zhanshibox');?>",{},function(res){	 

	    $('.zhanshibox').show(500);

	    if(res.code == 1){

		    $('.zhanshibox').hide();

			clearInterval(zhanshiboxsetInterval);

		}   

		$('.zhanshibox p').html(res.html);

		$('.zhanshibox p').fadeIn(500);

	},'json');

	setTimeout(function(){$('.zhanshibox p').fadeOut(500);}, 8000);

}

</script>

<style>

.zhanshibox { position: fixed; top: 0; left: 0; right: 0; height: 24px; background-color: rgba(0,0,0,0.3); text-align: center; font-size: 12px; line-height: 24px; color: #FFF; display: none; z-index: 9; }

.zhanshibox p { display: none; }

.zhanshibox span { color: #3F0; border: #3F0 1px solid; padding-left: 2px; padding-right: 2px; border-radius: 2px; }

</style>

<div class="msgbox">

  <input type="hidden" value="0" name="msgbox">

  <!--

      0无跳转 

      1拆红包 

      2转盘 

      3刮刮卡

      4个人中心

  -->

  <div class="box">

    <p class="title">提示</p>

    <p class="txt">恭喜您获得0元红包</p>

    <p class="but">确定</p>

  </div>

</div>

<div class="zhanshibox">

  <p></p>

</div>

<div id="dengdai">

    <div class="loading">

           <span></span>

           <span></span>

           <span></span>

           <span></span>

           <span></span>

    </div>

</div>

<div style="height:60px;"></div>

<script>

$(document).ready(function(){

    $('.toggle-sub-menu').click(function(){

        //alert(JSON.stringify(this.dataset));

        var selector = '#' + this.dataset.subMenuId;

        

        $('.sub-menu').hide();

        $(selector).fadeIn();

    })

});

</script>

<style>

.sub-menu {

	background: #333333;

    /* height: 50px; */

	position: fixed;

    /* left: 0; *//* bottom: 0; *//* right: 0; */

	padding: 9px 3px;

	width: 20%;

	/*font-size: 0.8em;*/

	

	display: none;

}



.sub-menu li:first-child {

	padding: 1px 0 6px 0;

}

.sub-menu li {

	/*width: 25%;*/

	text-align: center;

	/* float: left; */

	color: #FFF;

	/*border-right: #FFF 1px solid;*/

	border-bottom: darkgrey 1px solid;

	line-height: 14px;

	padding: 6px 0;

}



.sub-menu li:last-child {

	border: none;

	padding: 6px 0 0 0;

}



.sub-menu li a {

	color: #FFF;

}



</style>

<div id="sub-menu-more-game" class="sub-menu" style="bottom: 50px; left: 26%;">

 <!-- <ul>

    <li><a href="<?php echo U('Zhuanpan/index?randres='.rand(100,999));?>">转盘</a></li>

    <li><a href="<?php echo U('Guaguale/index?randres='.rand(100,999));?>">刮刮乐</a></li>

    <li><a href="<?php echo U('Saolei/index?randres='.rand(100,999));?>">扫雷</a></li> 

  </ul>  -->

</div>

<div id="sub-menu-free-game" class="sub-menu" style="bottom: 50px; left: 20%">

  <ul>

    <li><a href="<?php echo U('Checkin/index?randres='.rand(100,999));?>">签到</a></li>

    <li><a href="<?php echo U('Appraise/scoreboard?randres='.rand(100,999));?>">分享有奖</a></li>

  </ul>

</div>
<link rel="stylesheet" href="/xin/css/weui.min.css">
    <link rel="stylesheet" href="/xin/css/jquery-weui.min.css">
    <link rel="stylesheet" href="/xin/css/base.css">
    <link rel="stylesheet" href="/xin/css/animate.css">
<link rel="stylesheet" href="/xin/css/font_619806_a9lgrdc9i0jxlxr.css">
    <link rel="stylesheet" href="/xin/css/iconfont.css">
    <link rel="stylesheet" href="/xin/css/iconfont_1.css">
<footer class="footer">
    <div class="weui-tabbar">
        <a href="<?php echo U('Index/index?randres='.rand(100,999));?>" class="weui-tabbar__item dl ">
            <div class="weui-tabbar__icon">
                <img class="iconfont" src="/xin/picture/jie.png"  aria-hidden="true" alt="">
            </div>
            <p class="weui-tabbar__label">抢红包</p>
        </a>
	
        <a href="<?php echo U('Ucenter/index?randres='.rand(100,999));?>" class="weui-tabbar__item dl ">
            <div class="weui-tabbar__icon">
                <img class="iconfont" src="/xin/picture/jie.png"  aria-hidden="true" alt="">
            </div>
            <p class="weui-tabbar__label">代理</p>
        </a>
        <a href="<?php echo U('Index/kefu');?>" class="weui-tabbar__item kf ">
            <div class="weui-tabbar__icon">
                <img class="iconfont" src="/xin/picture/jie.png"  aria-hidden="true" alt="">
            </div>
            <p class="weui-tabbar__label">客服</p>
        </a>
    </div>
</footer>



</body>

</html>